import info.gridworld.actor.ActorWorld;
import Generator.*;
import Manage.Counter;
import info.gridworld.grid.Location;

import java.awt.Color;
import java.util.ArrayList;
public class test{
	public static void main(String [] args){
		ActorWorld world = new ActorWorld();
		Land.setWorld(world);
		Path.setWorld(world);
		Counter.setWorld(world);
		for(int r = 0; r< 10; r++)
			for(int y = 0; y <10;y++){
				world.add(new Location(r,y,0), new Land());
				world.getGrid().get(new Location(r,y,0)).setColor(Color.GREEN);
			}
		ArrayList<Location>path = new ArrayList<Location>();
		path.add(new Location(0,0));
		path.add(new Location(1,0));
		path.add(new Location(2,0));
		path.add(new Location(2,1));
		path.add(new Location(2,2));
		path.add(new Location(3,2));
		path.add(new Location(4,2));
		path.add(new Location(5,2));
		path.add(new Location(5,1));
		path.add(new Location(5,0));
		path.add(new Location(6,0));
		path.add(new Location(7,0));
		path.add(new Location(8,0));
		path.add(new Location(9,0));
		path.add(new Location(9,1));
		path.add(new Location(9,2));
		path.add(new Location(9,3));
		path.add(new Location(9,4));
		for(int i = 9; i > -1;i--)
			path.add(new Location(i,5));
		path.add(new Location(0,6));
		path.add(new Location(0,7));
		path.add(new Location(0,8));
		path.add(new Location(1,8));
		path.add(new Location(2,8));
		path.add(new Location(2,7));
		path.add(new Location(3,7));
		path.add(new Location(4,7));
		path.add(new Location(4,8));
		path.add(new Location(4,9));
		path.add(new Location(5,9));
		path.add(new Location(6,9));
		path.add(new Location(7,9));
		path.add(new Location(7,8));
		path.add(new Location(7,7));
		path.add(new Location(8,7));
		path.add(new Location(9,7));
		for(int i = 0; i < path.size();i++){
			if(world.getGrid().get(path.get(i)) instanceof Land)
				world.getGrid().remove(path.get(i));
			if(i ==0){
				world.add(path.get(i),new Generate());
			}
			else
			world.add(path.get(i), new Path());
		}
        world.show();
	}
}
